import Vue from 'vue'
import '@/assets/theme/element-variables.scss'
import {
  Button,
  Form,
  FormItem,
  Input,
  Upload,
  Dialog,
  Pagination,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioGroup,
  MessageBox,
  Message,
  Select,
  Option,
  Rate,
	DatePicker,
	TimeSelect,
  Image
} from 'element-ui'
import locale from 'element-ui/lib/locale/lang/en'

const components = [
  Button,
  Form,
  FormItem,
  Input,
  Upload,
  Dialog,
  Pagination,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioGroup,
  MessageBox,
  Message,
  Select,
  Option,
  Rate,
	DatePicker,
	TimeSelect,
  Image
];

const Element = {
  install (Vue) {
    components.forEach(component => {
      Vue.component(component.name, component)
    })
  }
}
Vue.use(Element, { locale })
Vue.prototype.$message = Message
